(a) Field of the Invention
The present invention relates to a diagnostic method for a logic used in a vehicle, and more particularly, to a diagnostic method to check for errors in a logic of an electronic control unit of a vehicle.
(b) Description of the Related Art
Vehicles are increasingly employing electronic controls to enhance driving performance and safety, as well as to provide ease of operation to the driver. However, the computer system provided in vehicles may experience errors as a result of noise generated by static electricity and electrical shock. Errors caused by external electronic waves are particularly problematic.
In order to prevent errors caused by noise, a program in a logic of the computer system is reset in the prior art in the case where an error is generated in an operation code. However, if errors are not generated in the operation code, it is determined that the logic operations are being performed normally even when errors are generated as a result of noise in a sequence of the logic operations. This causes the faulty operation of the logic.
The present invention has been made in an effort to solve the above problems.
It is an object of the present invention to provide a diagnostic method for a logic used in a vehicle in which errors in a sequence of logic operations in an electronic control unit can be precisely detected.
To achieve the above object, the present invention provides a diagnostic method for a logic used in a vehicle in which a sequence of a plurality of logic operations is predetermined, the method comprising the steps of assigning an ID to each logic operation; comparing an ID of a logic operation that should be performed (xe2x80x9ccorrect logic operationxe2x80x9d) with an ID of a logic operation to be performed (xe2x80x9cpresent logic operationxe2x80x9d) before the present logic operation is performed; and determining that an error has not occurred in the case where the correct logic operation corresponds to the present logic operation, and determining that an error has occurred in the case where the correct logic operation does not coincide with the present logic operation.
According to a feature of the present invention, the diagnostic method further comprises the steps of counting a time elapsed to perform all the logic operations; calculating a difference between the time elapsed to perform all the logic operations and a predetermined time; and determining that an error has occurred if the difference in time is greater than a predetermined value.